Skip to content

Conversation

@chopan050
Copy link
Contributor

@chopan050 chopan050 commented Oct 24, 2024

Overview: What does this pull request change?

  • Added missing docstrings for always(), cycle_animation() and assert_is_mobject_method().
  • Improved existing docstrings by including missing Parameters, Returns and Raises sections.
  • Added examples for always(), f_always() and cycle_animation().
  • Defined a MobjectT TypeVar in order to get better typings for the Mobjects returned by functions such as always_redraw(). For example, if the lambda function inside always_redraw() returns a Brace, the Mobject returned by always_redraw() is now recognized as a Brace and, as such, autocompletion includes Brace methods and attributes.
  • Completed typings where Callables were missing parameter and return types.
  • Removed unused **kwargs from turn_animation_into_updater() and cycle_animation().

Links to added or changed documentation pages

https://manimce--3976.org.readthedocs.build/en/3976/reference/manim.animation.updaters.mobject_update_utils.html

Reviewer Checklist

  • The PR title is descriptive enough for the changelog, and the PR is labeled correctly
  • If applicable: newly added non-private functions and classes have a docstring including a short summary and a PARAMETERS section
  • If applicable: newly added functions and classes are tested

@chopan050 chopan050 changed the title Improve docstrings and typings in mobject_update_utils, and add examples for always and f_always Improve docstrings and typings in mobject_update_utils, and add examples for always(), f_always() and cycle_animation() Oct 24, 2024
@chopan050 chopan050 changed the title Improve docstrings and typings in mobject_update_utils, and add examples for always(), f_always() and cycle_animation() Improve docs and typings for mobject_update_utils, and add examples for always(), f_always() and cycle_animation() Oct 24, 2024
@chopan050 chopan050 marked this pull request as draft August 10, 2025 02:22
@chopan050
Copy link
Contributor Author

I'll mark this as a draft for now. PR #4382 was submitted recently, which made me notice some flaws in the current implementation. Back in the time, I didn't stop ignoring MyPy errors for mobject_update_utils.py and, when I removed it from mypy.ini, many errors appeared that don't have an easy solution. I'll take a deeper look into them later.

@henrikmidtiby henrikmidtiby added the typehints For adding/discussing typehints label Dec 1, 2025
@henrikmidtiby henrikmidtiby mentioned this pull request Dec 2, 2025
22 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

typehints For adding/discussing typehints

Projects

Status: 🆕 New

Development

Successfully merging this pull request may close these issues.

2 participants